Public Class f_DCTDeleteTableSelection
    Dim objhdlr As New Cls_DCTDevHdlr
    Private Sub f_DCTDeleteTableSelection_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim strConString As String = "data source=.;initial catalog=" & f_DCTDevPreparation.f & ";persist security info=False;user id=realm;password=friend;packet size=4096"
        Dim ds As New DataSet
        ds = objhdlr.GetAlltableList(strConString)
        dgddeltable.DataSource = ds.Tables(0).DefaultView
        dgddeltable.Columns("name").DisplayIndex = 0
        dgddeltable.Columns("Deltblselect").DisplayIndex = 1
        dgddeltable.Columns("id").Visible = False
        dgddeltable.AutoResizeColumns()
    End Sub
    Private Sub btndelaccept_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btndelaccept.Click
        Dim f1 As New f_DCTDMLSelection
        Dim objparent As New Cls_DCTDelTableSelection
        Dim objchild As New Str_DCTDeltableSelection
        Dim altbldelname As New ArrayList
        Dim strConString As String = "data source=.;initial catalog=" & f_DCTDevPreparation.f & ";persist security info=False;user id=realm;password=friend;packet size=4096"
        Dim i As Integer
        i = dgddeltable.Rows.Count
        For i = 0 To i - 1
            objchild.tableName = dgddeltable.Rows(i).Cells(1).Value
            objchild.tblID = dgddeltable.Rows(i).Cells(2).Value
            If dgddeltable.Rows(i).Cells(0).Value = 1 Then
                objchild.checked = 1
            Else
                objchild.checked = 0
            End If
            altbldelname.Add(objchild)
        Next
        objparent.deltablenames = altbldelname
        objhdlr.InsertdelTableData(objparent, strConString)
        MessageBox.Show("DCT Tables having delete functionality selected successfully")
        Me.Hide()
    End Sub
End Class